<me:UITMKRF
    x:Class="WPFExcelReport.TICC_MKRF"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
     xmlns:Localization="clr-namespace:Localization;assembly=Localization"
     xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
     xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
     xmlns:me="clr-namespace:WPFExcelReport"
    x:Name="TV"
    Loaded="Window_Loaded"
 >
    <me:UITMKRF.Resources>
        <CollectionViewSource   x:Key="vwMaster" />
        <ucd:PNumConverter x:Key="pnum"/>
        <ucd:Divideby1440  x:Key="day"/>
        <ucd:Divideby480  x:Key="shift"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UITMKRF.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
       <WrapPanel Grid.Row="0">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Button Margin="20,0,0,0" Grid.Column="0"  VerticalAlignment="Center" Content="{Binding Source={Localization:Translate Word=重新拆分}}"   Width="Auto" Click="ReSplitCommand"/>
             </Grid> 
        <CheckBox IsChecked="{Binding IsRestart,ElementName=TV}"></CheckBox>
            <TextBlock   Width="Auto"  Margin="10,0,0,0" Text="{Binding Source={Localization:Translate Word=机台数:}}" VerticalAlignment="Center" />
            <TextBox VerticalAlignment="Center" Background="White"  Width="40" Text="{Binding Path=JP08,Source={StaticResource vwMaster}}" Margin="5,0,0,0"  />
        </WrapPanel>
        <DataGrid  Grid.Row="1" CanUserReorderColumns="True"  
                          FontSize="12"
                          CanUserResizeRows="True" CanUserSortColumns="True"                  
                          AutoGenerateColumns="False"   
                          EnableRowVirtualization="True"  
                          RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                          IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                          ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                          x:Name="dlgMaster" 
                  >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=JOBTYPE}" Header="{Binding Source={Localization:TranslateExtension Word=类型}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=MKFTP, Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:TranslateExtension Word=分批}}"  Width="Auto" />
                <DataGridTextColumn Foreground="Green"  Binding="{Binding Path=ABFMLFDNR}" Header="{Binding Source={Localization:TranslateExtension Word=实际}}"  Width="Auto" />
                <DataGridTextColumn FontSize="14" Foreground="Red" Binding="{Binding Path=ABFBLFDNR, Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:TranslateExtension Word=排产}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP05}" Header="{Binding Source={Localization:TranslateExtension Word=数量}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP01}" Header="{Binding Source={Localization:TranslateExtension Word=纱支}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP04}" Header="{Binding Source={Localization:TranslateExtension Word=产品组}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP05}" Header="{Binding Source={Localization:TranslateExtension Word=重量}}"  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</me:UITMKRF>
